<%@page contentType="text/html;charset=utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>用户注册-- 当当网</title>
		<!-- 引入外部 css 文件 -->
		<link rel="stylesheet" href="../css/tarena.css" type="text/css" />
		<link rel="stylesheet" href="../css/gwap.css" type="text/css" />
		<!-- 引入外部 js 文件 -->
		<script language="javascript" src="../js/tarena.js"></script>
		<script language="javascript" src="../js/province-city.js"></script>
		<script language="javascript">
	//检测输入是否正确
	
	function checkinput() {
		if (isEmpty(document.reg.username, 6, 15, '用户名只能输入‘字母’、‘数字’，长度6－15个字符!')) {
			return false;
		}
		if (!isValid(
				document.reg.username,
				'0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM',
				'用户名只能输入‘字母’、‘数字’，长度6－15个字符!')) {
			return false;
		}
		if (isEmpty(document.reg.password, 6, 12, '密码只能输入‘字母’、‘数字’，长度6－12个字符!')) {
			return false;
		}
		if (!passwordvalidate(document.reg.password, document.reg.password2,
				"您两次输入密码不一致！")) {
			return false;
		}
		if (!isEmail(document.reg.email)) {
			alert("必须符合EMail格式，长度在8-30个字符!");
			return false;
		}
		if (!isValid(document.reg.telephone, '0123456789-',
				'固定电话必须输入‘数字’、‘空格’或‘-’!')) {
			return false;
		}
		if (!isValid(document.reg.mobtelephone, '0123456789', '移动电话必须输入‘数字’!')) {
			return false;
		}
		var obj = eval(document.reg.city);
		if (obj == null || obj.value == '' || '0' == obj.value) {

			alert('省 和 市 必须选择!')
			obj.focus();
			return false;
		}
	}
</script>
		<script language="javascript">
	var request;
	try {
		request = new XMLHttpRequest();
	} catch (e) {
		try {
			request = new ActiveXObject("MSXML2.XMLHTTP");
		} catch (e) {
			request = new ActiveXObject("MICROSOFT.XMLHTTP");
		}
	}
	function query() {
		var username = document.reg.username.value;
		if (username == null || username == "") {
			document.reg.username.focus();
			return false;
		}
		var url = "../user/username.do?username=" + username
		request.open("GET", url, true);
		request.onreadystatechange = deal;
		request.send(null);
	}
	function deal() {
		if (request.readyState == 4 && request.status == 200) {
			document.getElementById("usernameHints").innerHTML = request.responseText;
		}
	}
</script>
	</head>
	<body>
		<div align="center">
			<form name="reg" method="post" action="registerValidate">
				<table width="900" border="0" cellpadding="0" cellspacing="0"
					class="BorderALLSolidCCCCCC">
					<tr>
						<td height="46" colspan="8" valign="top">
							<table width="900" border="0" cellpadding="0" cellspacing="0"
								class="BorderALLSolidF4E9CC">
								<tr>
									<td width="87" rowspan="2" valign="top">
										<a href="index"><img
												src="../images/logo.gif" alt="" width="87" height="40"
												border="0" /> </a>
									</td>
									<td width="687" height="20">
										&nbsp;
									</td>

									<td width="112">
										&nbsp;
									</td>
									<td width="12">
										&nbsp;
									</td>
								</tr>
								<tr>
									<td height="20">
										&nbsp;
									</td>
									<td align="left" valign="middle" nowrap="nowrap">
										<span class="font_12_1a66b3"><a href="loginForm">[用户登录]l
										</a> </span>|
										<span class="font_12_666">帮助</span>
									</td>
									<td>
										&nbsp;
									</td>

								</tr>
								<tr>
									<td height="2"></td>
									<td></td>
									<td></td>
									<td></td>
								</tr>
								<tr>
									<td height="2" colspan="4" valign="top">
										<hr color="#FF6600" size="2" />
									</td>

								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td width="96" height="18">
							&nbsp;
						</td>
						<td width="79">
							&nbsp;
						</td>
						<td width="65">
							&nbsp;
						</td>
						<td width="36">
							&nbsp;
						</td>
						<td width="490">
							&nbsp;
						</td>

						<td width="24">
							&nbsp;
						</td>
						<td width="45">
							&nbsp;
						</td>
						<td width="65">
							&nbsp;
						</td>
					</tr>
					<tr>
						<td height="31">
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td colspan="2" align="left" valign="middle">
							<span class="font_16_gray">注册步骤: </span><span class="font_16_red">1.填写信息</span>
							&gt;
							<span class="font_16_gray">2.验证邮箱 &gt; 3.注册成功</span>
						</td>

						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
					<tr>
						<td height="31">
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td colspan="3" align="left" valign="bottom">
							<p style="font-family: sans-serif; color: red; font-size: 14px">

								标记 ‘*’ 的为必填项

							</p>
						</td>

						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
					<tr>
						<td height="19">
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>

						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
					<tr>
						<td>
							&nbsp;
						</td>
						<td colspan="6" valign="top">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">

								<tr>
									<td height="35" align="right" valign="middle" nowrap="nowrap">
										<span class="font_12_666">昵称：</span>
									</td>
									<td align="left" valign="middle">
										<p>
											<input name="nickName" type="text" class="input_field_size"
												size="15" />
											<span id="usernameHints"></span>
											<span class="font_12_red"> *
												昵称只能输入‘字母’、‘数字’，长度6－15个字符。 </span>
										</p>
									</td>
								</tr>
								<tr>
									<td height="35" align="right" valign="middle" nowrap="nowrap">
										<span class="font_12_666">用户名：</span>
									</td>
									<td align="left" valign="middle">
										<p>
											<input name="realName" type="text" class="input_field_size"
												size="15" />
											<span id="usernameHints"></span>
											<span class="font_12_red"> *
												用户名只能输入‘字母’、‘数字’，长度6－15个字符。 </span>
										</p>
									</td>
								</tr>
								<tr>

									<td height="35" align="right" valign="middle" nowrap="nowrap">
										<span class="font_12_666">密&nbsp;&nbsp;码：</span>
									</td>
									<td align="left" valign="middle">
										<p>
											<input name="password" type="password"
												class="input_field_size" size="12" />
											<span class="font_12_red">* 密码只能输入‘字母’、‘数字’，长度6－12个字符。</span>
									</td>
								</tr>
								<tr>
									<td height="35" align="right" valign="middle" nowrap="nowrap">
										<span class="font_12_666">密码再入：</span>
									</td>

									<td align="left" valign="middle">
										<p>
											<input name="password2" type="password"
												class="input_field_size" size="12" />
											<span class="font_12_red">* 密码只能输入‘字母’、‘数字’，长度6－12个字符。</span>
									</td>
								</tr>
								<tr>
									<td width="143" height="35" align="right" valign="middle"
										nowrap="nowrap">
										<span class="font_12_666">Email：</span>
									</td>
									<td width="596" align="left" valign="middle">
										<p>
											<input name="email" type="text" class="input_field_size"
												id="email" size="30" />
											&nbsp;&nbsp;
											<input name="verification" type="checkbox" checked="checked" />

											<span class="font_12_red">* 必须符合EMail格式，长度在1-30个字符。复选筐
												钩选，表示同意Mail验证。</span>
									</td>
								</tr>
								<tr>
									<tr>
										<td width="143" height="35" align="right" valign="middle"
											nowrap="nowrap">
											<span class="font_12_666">电  话：</span>
										</td>
										<td width="596" align="left" valign="middle">
											<p>
												<input name="phone" type="text"
													class="input_field_size" id="mobtelephone" size="15" />
												<span class="font_12_red">必须输入‘数字’。</span>
										</td>
									</tr>
									<tr>

										<td width="143" height="35" align="right" valign="middle"
											nowrap="nowrap">
											<span class="font_12_666">所在省市：</span>
										</td>
										<td width="596" align="left" valign="middle">
											<p>
												<table>
													<tr>
														<td>
															<select name="province" style="width: 150"
																onclick="showProvinceCity(this)">
																<option value="0">
																	-----请选择(省)-----
																</option>

																<option value="北京">
																	北京
																</option>
																<option value="广东">
																	广东
																</option>
																<option value="上海">
																	上海
																</option>
																<option value="陕西">

																	陕西
																</option>
																<option value="安徽">
																	安徽
																</option>
																<option value="重庆">
																	重庆
																</option>
																<option value="福建">
																	福建
																</option>

																<option value="甘肃">
																	甘肃
																</option>
																<option value="广西">
																	广西
																</option>
																<option value="贵州">
																	贵州
																</option>
																<option value="河南">

																	河南
																</option>
																<option value="湖北">
																	湖北
																</option>
																<option value="河北">
																	河北
																</option>
																<option value="海南">
																	海南
																</option>

																<option value="黑龙江">
																	黑龙江
																</option>
																<option value="湖南">
																	湖南
																</option>
																<option value="吉林">
																	吉林
																</option>
																<option value="江苏">

																	江苏
																</option>
																<option value="江西">
																	江西
																</option>
																<option value="辽宁">
																	辽宁
																</option>
																<option value="内蒙古">
																	内蒙古
																</option>

																<option value="宁夏">
																	宁夏
																</option>
																<option value="青海">
																	青海
																</option>
																<option value="四川">
																	四川
																</option>
																<option value="山东">

																	山东
																</option>
																<option value="山西">
																	山西
																</option>
																<option value="天津">
																	天津
																</option>
																<option value="新疆">
																	新疆
																</option>

																<option value="西藏">
																	西藏
																</option>
																<option value="云南">
																	云南
																</option>
																<option value="浙江">
																	浙江
																</option>
																<option value="香港">

																	香港
																</option>
																<option value="澳门">
																	澳门
																</option>
															</select>
															&nbsp;&nbsp;
															<span id="districtcity"> <select name="city"
																	style="width: 150">
																	<option value="0">

																		-----请选择(市)-----
																	</option>
																</select> </span>
														</td>
													</tr>
												</table>
												<span class="font_12_red"></span>
										</td>
									</tr>

									<tr>
										<td width="143" height="35" align="right" valign="middle"
											nowrap="nowrap">
											<span class="font_12_666">住址：</span>
										</td>
										<td width="596" align="left" valign="middle">
											<p>
												<input name="address" type="text"
													class="input_field_size_290" id="address" size="200" />
												<span class="font_12_red"></span>
										</td>
									</tr>

									<tr>
										<td height="35" align="right" valign="middle" nowrap="nowrap">
											<span class="font_12_666">邮政编码：</span>
										</td>
										<td align="left" valign="middle">
											<p>
												<input name="postalCode" type="text"
													class="input_field_size" size="15" />
												<span id="postalCodeHints"></span>
												<span class="font_12_red"> *
													邮政编码必须为六位数字,一般情况下，中国就是这样。 </span>
											</p>
										</td>
									</tr>

									<tr>
										<td height="35" align="right" valign="middle" nowrap="nowrap">
											<span class="font_12_666">验证码：</span>
										</td>
										<td align="left" valign="middle">
											<p>
												<input name="verifyCode" type="text"
													class="input_field_size" size="15" />
												<span id="usernameHints"></span>
												<span class="font_12_red">等待图片的出现 </span>
											</p>
										</td>
									</tr>

									<tr>
										<td>
											&nbsp;
										</td>

										<td align="left">
											<input type="submit" value=" 注 册"
												onclick="return checkinput()" />
											&nbsp;&nbsp;
											<input type="reset" name="reset" id="reset" value="重  置" />
										</td>
									</tr>
							</table>
						</td>
						<td>
							&nbsp;
						</td>
					</tr>

					<tr>
						<td height="1" colspan="8" valign="top">
							<hr color="#999999" size="1" />
						</td>
					</tr>

					<tr>
						<td height="14">
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>

					</tr>
					<tr>
						<td height="48">
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td colspan="4" align="center" valign="middle" nowrap="nowrap"
							class="font_12_0D7101">
							Copyright (C) 当当网 2004-2008, All Rights Reserved
							<img src="../images/icon/validate.gif" alt="" width="40"
								height="48" align="middle" />
							<a href="http://www.miibeian.gov.cn">京ICP证041189号</a>
						</td>
						<td>
							&nbsp;
						</td>
						<td></td>

					</tr>
					<tr>
						<td height="14">
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>

						<td></td>
					</tr>
				</table>
			</form>
		</div>
	</body>
</html>

